package com.zpark.sports.controller;

import com.zpark.sports.pojo.BasketballMallUser;

import javax.servlet.http.HttpSession;

/**
 * @PackageName: com.zpark.sports.controller
 * @ClassName: BaseController
 * @Description:
 * @author: RZS
 * @date: 2022/10/18  17:25
 */
public abstract class BaseController {

    public final static Integer CODE_SUCCESS = 2000;

    /**
     * 从session对象中获取用户登录信息
     * @param session
     * @return
     */
    public BasketballMallUser getUser(HttpSession session){
        return (BasketballMallUser) session.getAttribute("User");
    }
}
